home *** CD-ROM | disk | FTP | other *** search
- #include "sfx gestalt equ.h"
-
- pascal OSErr main(OSType gestaltSelector, long *gestaltResponse)
- {
- long theValue;
-
- asm
- {
- bra.s @4
- @1 dc.l 0 /* will store address of fade here */
- @2 dc.l 0 /* will store address of shutdown proc here */
- @3 dc.l 0 /* will store address of restart proc here */
- @4
- }
-
- switch (gestaltSelector)
- {
- case sfxGetFadeProcPtr:
- asm
- {
- move.l @1, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetShutdownProcPtr:
- asm
- {
- move.l @2, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetRestartProcPtr:
- asm
- {
- move.l @3, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetFadeProcPtrAddress:
- asm
- {
- lea @1, a0
- move.l a0, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetShutdownProcPtrAddress:
- asm
- {
- lea @2, a0
- move.l a0, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetRestartProcPtrAddress:
- asm
- {
- lea @3, a0
- move.l a0, theValue
- }
- *gestaltResponse=theValue;
- return noErr;
- case sfxGetVersion:
- *gestaltResponse=1L;
- return noErr;
- }
-
- return -1;
- }
-